package thread;

/**
 * Created by Xiang on 2014/8/17.
 */
public class ThreadTest implements Runnable{
    private String name;
    public ThreadTest(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 100000; j++) {

            }
            System.out.println(name+i);
        }
    }

    public static void main(String[] args) {
        ThreadTest t1 = new ThreadTest("Lee");
        ThreadTest t2 = new ThreadTest("Jack");

        Thread thread1 = new Thread(t1);
        Thread thread2 = new Thread(t2);

        thread1.start();
        thread2.start();
    }
}
